/**
 * @file example_004.cpp
 * @author 逆流 (1171267147@qq.com)
 * @brief 测试noncopyable
 * @version 1.0
 * @date 2025-06-22
 *
 * @copyright Copyright (c) 2025
 *
 */

#include <boost/core/ignore_unused.hpp>
#include <boost/format.hpp>
#include <boost/noncopyable.hpp>
#include <iostream>

#include "stl/utility/noncopyable.hpp"

using std::cout;
using std::endl;

class UniqueClass : public boost::noncopyable {
public:
    static void message() { cout << "Noncopyable" << '\n'; }
};

class UniqueClass2 : public stl::Noncopyable {
public:
    UniqueClass2()  = default;
    ~UniqueClass2() = default;

    void message() const { cout << count_ << '\n'; }

private:
    int count_{0};
};

int main() {
    UniqueClass test;

    UniqueClass::message();

    // auto copyObj = test;  // copy constructor 被删除，无法复制
    boost::ignore_unused(test);

    UniqueClass2 test2;
    test2.message();
    // auto test3 = test2;
    // stl::ignored_unused(test2);

    return 0;
}
